package com.lanhai.enums;

/**
 * 地标类型
 * @author liangmin
 *
 */
public enum GpType {
	GW(1, "对接工位"),
	JG(2, "交管"),
	DM(3, "待命点"),
	LK(4, "工位离开点"),
	XXR(5, "限行区入口"),
	XXC(6, "限行区出口"),
	CD(7, "充电位"),
	CDLK(8, "充电位离开"),
	LS(9, "临时停泊点"),
	SFJG(10,"释放交管"),
	CDW(11,"重定位点"),
	XZD(12,"询问点");
	
	private GpType(Integer code, String name){
		this.code = code;
		this.name = name;
	}
	
	private Integer code;
	private String name;
	public Integer getCode() {
		return code;
	}
	public void setCode(Integer code) {
		this.code = code;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
    public static String getValueByCode(Integer code){
        for(GpType gt:GpType.values()){
            if(code == gt.getCode()){
                return gt.getName();
            }
        }
        return  null;
    }
	
}
